#include <buola/scene/transform/csoftbody.h>
#include <buola/scene/cgeode.h>
#include <buola/scene/cscene.h>
#include <buola/scene/geodes/ccloth.h>
#include <buola/mat/transformations.h>
#include <btBulletDynamicsCommon.h>
#include <BulletSoftBody/btSoftBodyHelpers.h>

namespace buola { namespace scene {

CSoftBody::CSoftBody(const PCloth &pCloth)
{
    mCloth=pCloth;
    mLocalTransform=mat::identity_3d();
    AddObject(mCloth);
}

CSoftBody::~CSoftBody()
{
}

void CSoftBody::OnScene(const PScene &pScene)
{
    mBody.reset(mCloth->MakeSoftBody(pScene));
}

void CSoftBody::CalcLocalTransform()
{
    mLocalTransformValid=true;
}

/*namespace scene*/ } /*namespace buola*/ }
